function cleanup(){
	$$('link').set('href','');  //kill stylesheets
	$$('img').destroy();	    //kill images
	$$('*').set('style','');	//kill hardcoded stuff
}

function trimFat(content){
	cleanup();

	body = $(document.body); 

	div = new Element('div');
	content.inject(div);

	body.empty();
	body.adopt(div);

	content.setStyles({
		'padding':'0 0.5em',
		'text-align':'justify',
		'-webkit-column-count': '3',
		'-webkit-column-gap': '1.2em',
		'-webkit-column-rule': '1px solid silver'
	});
}

chrome.extension.onRequest.addListener(function(request, sender, sendResponse) { 
	if (request.action == "24ur.com") 
	{
		trimFat($('content'));
	}

	if (request.action == "vizita.si") 
	{
		trimFat($('main_content').getElement('.article'));
	}
}); 
